﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using Micrhard.FMCG.Server.Validator;
using Microhard.Core.Extensions;

namespace Micrhard.FMCG.Server.Models
{
    [FluentValidation.Attributes.Validator(typeof(CompanyModelValidator))]
    public class CompanyModel : BasePermissionModel
    {
        [ModelPKID]
        public Guid CompanyID { set; get; }
        public Guid Com_CompanyID { set; get; }
        public string Name { set; get; }
        public int CompanyType { set; get; }
        public bool Status { set; get; }

        public string TypeDisplay
        {
            get
            {
                if (CompanyType == (int)Micrhard.FMCG.Server.Models.CompanyType.Heaer)
                {
                    return Micrhard.FMCG.Server.Models.CompanyType.Heaer.GetDisplayText();
                }
                return Micrhard.FMCG.Server.Models.CompanyType.Sub.GetDisplayText();
            }
        }
        public string MontherCompanyName { set; get; }
    }
}
